<template>
  <div>
    <h4>子组件--{{ a }}--{{ b }}</h4>
    <button @click="doClick">子组件</button>
  </div>
</template>

<script>
export default {
  props: {
    a: {
      type: Number,
      required: true
    },
    b: {
      type: Number,
      required: true
    }
  },
  methods: {
    doClick() {
      this.$emit('update:a', this.a + 1)
      this.$emit('update:b', this.a + 1)
    }
  }
}
</script>

<style>

</style>
